//
//  GSNetStaus.m
//  GameSky
//
//  Created by lanou on 16/1/20.
//  Copyright © 2016年 NiRongfei. All rights reserved.
//

#import "GSNetStaus.h"

@implementation GSNetStaus

+ (GSNetStaus *)sharedHandle
{
    static GSNetStaus *staus = nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        staus = [[GSNetStaus alloc]init];

    });
    
    return staus;
    
}

- (BOOL)picMode
{
    
    NSString *picMode = [[NSUserDefaults standardUserDefaults] objectForKey:@"picMode"];
    
    if ([self.reachable isEqualToString:@"WiFi"]) {
        
        return YES;
        
    }
    
    if([self.reachable isEqualToString:@"WWAN"] && [picMode isEqualToString:@"on"]) {
        
        return NO;
        
    }
    
    if([self.reachable isEqualToString:@"WWAN"] && [picMode isEqualToString:@"off"]) {
        
        return YES;
    }
    
    return NO;
    
}


@end
